From d0a005909aa12e8b75ad6dfacc9d48d9e7eb22b4 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Fri, 9 Mar 2007 01:25:43 +0000 Subject: [PATCH] Remove VDI.set_SR -- this was always unimplemented, and pretty mad. Signed-off-by: Ewan Mellor --- docs/xen-api/xenapi-datamodel.tex | 36 +------------------------------ tools/libxen/include/xen_vdi.h | 7 ------ tools/libxen/src/xen_vdi.c | 16 -------------- tools/python/xen/xend/XendAPI.py | 7 ++---- 4 files changed, 3 insertions(+), 63 deletions(-) diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index c1e4a7cfc6..90d9abf875 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -9583,7 +9583,7 @@ Quals & Field & Type & Description \\ $\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\ $\mathit{RW}$ & {\tt name/label} & string & a human-readable name \\ $\mathit{RW}$ & {\tt name/description} & string & a notes field containg human-readable description \\ -$\mathit{RW}$ & {\tt SR} & SR ref & storage repository in which the VDI resides \\ +$\mathit{RO}_\mathit{ins}$ & {\tt SR} & SR ref & storage repository in which the VDI resides \\ $\mathit{RO}_\mathit{run}$ & {\tt VBDs} & (VBD ref) Set & list of vbds that refer to this disk \\ $\mathit{RO}_\mathit{run}$ & {\tt crash\_dumps} & (crashdump ref) Set & list of crash dumps that refer to this disk \\ $\mathit{RW}$ & {\tt virtual\_size} & int & size of disk as presented to the guest (in bytes). Note that, depending on storage backend type, requested size may not be respected exactly \\ @@ -9876,40 +9876,6 @@ SR ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_SR} - -{\bf Overview:} -Set the SR field of the given VDI. - - \noindent {\bf Signature:} -\begin{verbatim} void set_SR (session_id s, VDI ref self, SR ref value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt VDI ref } & self & reference to the object \\ \hline - -{\tt SR ref } & value & New value to set \\ \hline - -\end{tabular} - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -void -} - - - \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} diff --git a/tools/libxen/include/xen_vdi.h b/tools/libxen/include/xen_vdi.h index 90120370d5..26e147250e 100644 --- a/tools/libxen/include/xen_vdi.h +++ b/tools/libxen/include/xen_vdi.h @@ -292,13 +292,6 @@ extern bool xen_vdi_set_name_description(xen_session *session, xen_vdi vdi, char *description); -/** - * Set the SR field of the given VDI. - */ -extern bool -xen_vdi_set_sr(xen_session *session, xen_vdi vdi, xen_sr sr); - - /** * Set the virtual_size field of the given VDI. */ diff --git a/tools/libxen/src/xen_vdi.c b/tools/libxen/src/xen_vdi.c index 150d341b1b..2e50db9e80 100644 --- a/tools/libxen/src/xen_vdi.c +++ b/tools/libxen/src/xen_vdi.c @@ -409,22 +409,6 @@ xen_vdi_set_name_description(xen_session *session, xen_vdi vdi, char *descriptio } -bool -xen_vdi_set_sr(xen_session *session, xen_vdi vdi, xen_sr sr) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vdi }, - { .type = &abstract_type_string, - .u.string_val = sr } - }; - - xen_call_(session, "VDI.set_SR", param_values, 2, NULL, NULL); - return session->ok; -} - - bool xen_vdi_set_virtual_size(xen_session *session, xen_vdi vdi, int64_t virtual_size) { diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index 4ab6916b53..69ebb3f341 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -1754,13 +1754,13 @@ class XendAPI(object): # Xen API: Class VDI # ---------------------------------------------------------------- - VDI_attr_ro = ['VBDs', + VDI_attr_ro = ['SR', + 'VBDs', 'physical_utilisation', 'sector_size', 'type'] VDI_attr_rw = ['name_label', 'name_description', - 'SR', 'virtual_size', 'sharable', 'read_only'] @@ -1812,9 +1812,6 @@ class XendAPI(object): self._get_VDI(vdi_ref).name_description = value return xen_api_success_void() - def VDI_set_SR(self, session, vdi_ref, value): - return xen_api_error(XEND_ERROR_UNSUPPORTED) - def VDI_set_virtual_size(self, session, vdi_ref, value): return xen_api_error(XEND_ERROR_UNSUPPORTED) -- 2.30.2